package com.jihu.design.creatation.factory.factorymethod;

/**
 * @author jihu
 * @date 2021/9/15
 */
public class MainTest {

    public static void main(String[] args) {
        AbstractCarFactory racingFactory = new WuLinRacingFactory();
        AbstractCar racingCar = racingFactory.newCar();
        racingCar.run();

        AbstractCarFactory miniCarFactory = new WuLinMiniCarFactory();
        AbstractCar miniCar = miniCarFactory.newCar();
        miniCar.run();

        AbstractCarFactory vanCarFactory = new WuLinVanCarFactory();
        AbstractCar vanCar = vanCarFactory.newCar();
        vanCar.run();

    }
}
